#!/bin/sh
# Usage:
# bash password.sh [IPFILE]

[ $# -gt 0 -a -f "$1" ] || exit 1

cat $1 | while read ip; do
    user='mcloud'
    newpasswd='memo3366'
    expect ./password.exp $ip $user $newpasswd
done
